//
//  EditNameController.m
//  LiquorChain
//
//  Created by apple on 2018/12/29.
//  Copyright © 2018年 王冬. All rights reserved.
//

#import "EditNameController.h"

@interface EditNameController ()
@property (nonatomic,strong) UITextField *nameTextFiled;
@property (nonatomic,strong) UIButton *commitBtn;
@end

@implementation EditNameController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"修改用户名";
    UIView *backView =[[UIView alloc]initWithFrame:CGRectMake(0, kNavBarHeight, SCREEN_WIDTH, 15)];
    backView.backgroundColor =BACKGROUNDCOLOR;
    [self.view addSubview:backView];
    self.nameTextFiled =[[UITextField alloc]initWithFrame:CGRectMake(14, kNavBarHeight +15, SCREEN_WIDTH -28, 65)];
    self.nameTextFiled.placeholder = @"以中文或英文字母开头，限4-16个字符";
    self.nameTextFiled.font =[UIFont systemFontOfSize:15];
    [self.view addSubview:self.nameTextFiled];
    self.commitBtn =[UIButton buttonWithType:UIButtonTypeCustom];
    [self.commitBtn setTitle:@"确认" forState:UIControlStateNormal];
    [self.commitBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    self.commitBtn.titleLabel.font =[UIFont systemFontOfSize:18];
    self.commitBtn.frame = CGRectMake(15, kNavBarHeight + 15 +65, SCREEN_WIDTH-30, 50);
    [self.commitBtn addTarget:self action:@selector(commitClick:) forControlEvents:UIControlEventTouchUpInside];
    self.commitBtn.backgroundColor = CUSTOMCOLOR;
    self.commitBtn.layer.cornerRadius = 5;
    [self.view addSubview:self.commitBtn];
    // Do any additional setup after loading the view.
}
-(void)commitClick:(UIButton *)sender{
    NSLog(@"确认");
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
